package com.yunzhi.net.config;

/**
 * 网络请求参数
 */

public class ApiConfig {

    public static final int DEFAULT_TIMEOUT = 5000;


    private static class ApiConfigHolder {
        private static final ApiConfig INSTANCE = new ApiConfig();
    }

    public static ApiConfig getInstance() {
        return ApiConfigHolder.INSTANCE;
    }

    private ApiConfig() {

    }


    /**
     * 获取URl接口
     */
    public String getServerUrl(HostType host) {

//        if (BuildConfig.DEBUG) {
//            return HostType.TEST_HOST.getHost();
//        }

        switch (host) {
            case MAIN_HOST:
                return HostType.MAIN_HOST.getHost();

            case TEST_HOST:
                return HostType.TEST_HOST.getHost();

            default:
                return HostType.MAIN_HOST.getHost();
        }

    }

}
